//
//  AppDelegate.m
//  TemplateSDKDemo
//
//  Created by Antony on 8/31/15.
//  Copyright © 2015 EF. All rights reserved.
//

#import "AppDelegate.h"
#import "TemplateSDKDefines.h"
#import "TemplateSDK.h"

@interface AppDelegate ()

@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    NSString *docPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
                                                             NSUserDomainMask, YES) lastObject];
    NSArray *files = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:docPath error:nil];
    
    [files enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
        [[NSFileManager defaultManager] removeItemAtPath:obj error:nil];
    }];
    _window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    _window.backgroundColor = [UIColor whiteColor];
    _window.rootViewController = [[UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]] instantiateInitialViewController];
    [_window makeKeyAndVisible];
    
    return YES;
}
@end
